package chess

type Handle interface {
}

//Chessboard 红在下，初始化时 1为左，2为右
type Chessboard struct { //棋盘
	//各个棋子
	RedChariot1 *Chariot
	RedChariot2 *Chariot
	BlaChariot1 *Chariot
	BlaChariot2 *Chariot

	RedHorse1 *Horse
	RedHorse2 *Horse
	BlaHorse1 *Horse
	BlaHorse2 *Horse

	RedCannon1 *Cannon
	RedCannon2 *Cannon
	BlaCannon1 *Cannon
	BlaCannon2 *Cannon

	RedElephant1 *Elephant
	RedElephant2 *Elephant
	BlaElephant1 *Elephant
	BlaElephant2 *Elephant

	RedGuards1 *Guard
	RedGuards2 *Guard
	BlaGuards1 *Guard
	BlaGuards2 *Guard

	RedSoldier1 *Soldier
	RedSoldier2 *Soldier
	RedSoldier3 *Soldier
	RedSoldier4 *Soldier
	RedSoldier5 *Soldier
	BlaSoldier1 *Soldier
	BlaSoldier2 *Soldier
	BlaSoldier3 *Soldier
	BlaSoldier4 *Soldier
	BlaSoldier5 *Soldier

	RedKing *King
	BlaKing *King

	//用坐标找Piece
	M map[Point]MoveChess
}

type Point struct {
	//列
	Line int `json:"line"`
	//行
	Row int `json:"row"`
}

type RespChess struct {
	Status []PointAndChess
}

type PointAndChess struct {
	Point
	Chess string `json:"chess"`
}

// Piece 棋子
type Piece struct {
	piece interface{}
	Color string
	Point
	Status     bool
	Name       string
	chessboard *Chessboard
}

func (p *Piece) SetChessboard(c *Chessboard) {
	p.chessboard = c
}

type Red struct {
	//红方状态

}

type Black struct {
	//黑方状态
}

type Chariot struct {
	*Piece
}

type Horse struct {
	*Piece
}

type Elephant struct {
	*Piece
}

type Guard struct {
	*Piece
}

type King struct {
	//将
	*Piece
}

type Cannon struct {
	*Piece
}

type Soldier struct {
	*Piece
}

type Null struct {
	//空
}
